
public class NameInfo {


     public NameInfo() {}


    /**
 *
 * @return String array of all areas names from the
     *
     * FOR GUI
 */
    public static String[] getAreaNames(){
        int[] areas= BusStopInfo.getAreas();
        String[] areasNames=new String[areas.length];
        for (int i = 0; i < areasNames.length; i++)
          areasNames[i]=BusStopInfo.getAreaName(areas[i]);
        return areasNames;
    }


    /**
 * method to find out about bus stops names for a given name of an area
 * @param areaName String  name of an area
 * @return String array containing names of bus stops in a given area
     *
     * FOR GUI
 */

     public static String[] getBusStopsNames(String areaName){
        String[] areaBusStops=null;
        if(areaName.equals("Birch Vale"))
            areaBusStops=new String[]{ "Grouse Hotel" };
        else if(areaName.equals("Compstall"))
            areaBusStops=new String[]{  };
       else if(areaName.equals("Glossop"))
            areaBusStops=new String[]{ "Grouse Inn", "Henry Street", "Little Hayfield" };
        else if(areaName.equals("Hayfield"))
            areaBusStops=new String[]{ "Bus Station" };
        else if(areaName.equals("Low Leighton"))
            areaBusStops=new String[]{ "Ollerset View Hospital" };
        else if(areaName.equals("Marple"))
            areaBusStops=new String[]{"Back of Beyond", "Navigation Hotel",
             "Offerton Fold" };
        //"Norfolk Arms",
        else if(areaName.equals("New Mills"))
            areaBusStops=new String[]{ "Bus Station" };
        else if(areaName.equals("Newtown"))
            areaBusStops=new String[]{ "Train Station" };
        else if(areaName.equals("Offerton"))
            areaBusStops=new String[]{   };
        else if(areaName.equals("Romiley"))
            areaBusStops=new String[]{ "Corcoran Drive", 
            "Train Station"};
        //"Frog and Diver Arms",
        else if(areaName.equals("Stockport"))
            areaBusStops=new String[]{ "Asda/Sainsbury's", "Bus Station",
            "Dialstone Lane/Hillcrest Road", 
            "Lower Bents Lane/Stockport Road"};
        //"Intermediate Road",
        else if(areaName.equals("Strines"))
            areaBusStops=new String[]{ "Royal Oak" };
        else if(areaName.equals("Thornsett"))
            areaBusStops=new String[]{ "Printers Arms" };
        else
            areaBusStops=new String[]{
				"Bus Station", "Intermediate Road", "Dialstone Lane/Hillcrest Road",
				"Navigation Hotel", "Back of Beyond", "Norfolk Arms","Corcoran Drive",
				"Train Station","Frog and Diver Arms","Lower Bents Lane/Stockport Road",
				"Asda/Sainsbury's","Train Station","Corcoran Drive","Henry Street","Grouse Inn",
				"Little Hayfield"};

        return areaBusStops;
     }



    static int[] getStopsProperOrder(int route){
       int[] busStops=TimetableInfo.getTimingPoints(route);
       int[] properOrder=new int[busStops.length];
        if(route==68 ){
             properOrder[0]=busStops[1];
             properOrder[1]=busStops[5];
             properOrder[2]=busStops[6];
             properOrder[3]=busStops[7];
             properOrder[4]=busStops[8];
             properOrder[5]=busStops[9];
             properOrder[6]=busStops[0];
             properOrder[7]=busStops[2];
             properOrder[8]=busStops[3];
             properOrder[9]=busStops[4];
             properOrder[10]=busStops[10];
             properOrder[11]=busStops[11];
             properOrder[12]=busStops[12];
        }
        else if(route==67){
            properOrder[0]=busStops[10];
             properOrder[1]=busStops[11];
             properOrder[2]=busStops[12];
             properOrder[3]=busStops[0];
             properOrder[4]=busStops[1];
             properOrder[5]=busStops[2];
             properOrder[6]=busStops[3];
             properOrder[7]=busStops[4];
             properOrder[8]=busStops[5];
             properOrder[9]=busStops[6];
             properOrder[10]=busStops[7];
             properOrder[11]=busStops[8];
             properOrder[12]=busStops[9];
        }else
            properOrder=busStops;
       return properOrder;
    }

    static String[] getStopNames(int route) {
        int[] busStops=TimetableInfo.getTimingPoints(route);
        String[] stopsNames=new String[busStops.length];//
        if(route==68 ){
             stopsNames[0]=BusStopInfo.getFullName(busStops[1]);
             stopsNames[1]=BusStopInfo.getFullName(busStops[5]);
             stopsNames[2]=BusStopInfo.getFullName(busStops[6]);
             stopsNames[3]=BusStopInfo.getFullName(busStops[7]);
             stopsNames[4]=BusStopInfo.getFullName(busStops[8]);
             stopsNames[5]=BusStopInfo.getFullName(busStops[9]);
             stopsNames[6]=BusStopInfo.getFullName(busStops[0]);
             stopsNames[7]=BusStopInfo.getFullName(busStops[2]);
             stopsNames[8]=BusStopInfo.getFullName(busStops[3]);
             stopsNames[9]=BusStopInfo.getFullName(busStops[4]);
             stopsNames[10]=BusStopInfo.getFullName(busStops[10]);
             stopsNames[11]=BusStopInfo.getFullName(busStops[11]);
             stopsNames[12]=BusStopInfo.getFullName(busStops[12]);
             for (int i = 0; i < busStops.length; i++)
             {
                  while(stopsNames[i].length()<44)
                  {
                    stopsNames[i]=stopsNames[i]+"-";
                  System.out.println("");
             }
           }

        }
        else if(route==67){
            stopsNames[0]=BusStopInfo.getFullName(busStops[10]);
             stopsNames[1]=BusStopInfo.getFullName(busStops[11]);
             stopsNames[2]=BusStopInfo.getFullName(busStops[12]);
             stopsNames[3]=BusStopInfo.getFullName(busStops[0]);
             stopsNames[4]=BusStopInfo.getFullName(busStops[1]);
             stopsNames[5]=BusStopInfo.getFullName(busStops[2]);
             stopsNames[6]=BusStopInfo.getFullName(busStops[3]);
             stopsNames[7]=BusStopInfo.getFullName(busStops[4]);
             stopsNames[8]=BusStopInfo.getFullName(busStops[5]);
             stopsNames[9]=BusStopInfo.getFullName(busStops[6]);
             stopsNames[10]=BusStopInfo.getFullName(busStops[7]);
             stopsNames[11]=BusStopInfo.getFullName(busStops[8]);
             stopsNames[12]=BusStopInfo.getFullName(busStops[9]);
             for (int i = 0; i < busStops.length; i++)
             {
               while(stopsNames[i].length()<44)
                  {
                    stopsNames[i]=stopsNames[i]+"-";
                  System.out.println(stopsNames[i].length());
                }
                }
        }else
             for (int i = 0; i < busStops.length; i++) {
                stopsNames[i]=BusStopInfo.getFullName(busStops[i])+ "-";
                 while(stopsNames[i].length()<44)
                  {
                    stopsNames[i]=stopsNames[i]+"-";
                  System.out.println(stopsNames[i].length());
                }
             }
        return stopsNames;
    }
/**
 *   This class is not intended to be instantiated.
 * Use  it to grab values for an interface
 * 
 */

}
